home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
wsc4c21.zip
/
ACCEPT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1997-05-22
|
1KB
|
46 lines
/* accept.c */
#include <windows.h>
#include "accept.h"
#define TEXT_SIZE 50
static char TextEditBuf[TEXT_SIZE] = {"\0"};
int GetAcceptText(LPSTR Ptr)
{if(TextEditBuf[0]=='\0') return FALSE;
else
{lstrcpy((LPSTR)Ptr,(LPSTR)TextEditBuf);
TextEditBuf[0] = '\0';
return TRUE;
}
}
#ifdef WIN32
BOOL CALLBACK
#else
BOOL FAR PASCAL
#endif
AcceptDlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{switch (iMsg)
{case WM_INITDIALOG:
if(lParam==0) SetWindowText(hDlg,"Enter Phone #");
if(lParam==1) SetWindowText(hDlg,"XMODEM file name ?");
if(lParam==2) SetWindowText(hDlg,"YMODEM file name ?");
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{case IDD_EDIT:
GetDlgItemText(hDlg,IDD_EDIT,(LPSTR)TextEditBuf,TEXT_SIZE);
return TRUE;
case IDOK:
EndDialog(hDlg, TRUE);
return TRUE;
}
break;
default:
return FALSE;
}
return FALSE;
} /* end AcceptDlgProc */